package com.bball.court.controller.parse;

import android.util.Log;

import com.bball.court.controller.PlayerController;
import com.parse.ParseException;
import com.parse.ParseUser;

/**
 * Created by fatou-kine.camara on 13-05-16.
 */
public class ParsePlayerController implements PlayerController {

    @Override
    public void editNickname(String email, String nickname) {
        try {
            ParseUser user = ParseUser.getCurrentUser();
            user.setUsername(nickname);
            user.save();
        } catch (ParseException e) {
            Log.e(getClass().getSimpleName(), e.getMessage(), e);
        }
    }

}
